package com.ml.rocketmqprocon.consumer;

import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * 消费事务消息
 *
 * @author xr-8
 * @date 2021-05-05
 * @time 22:10
 */
@Component
@RocketMQMessageListener(topic = "Topic2", consumerGroup = "consumer-demo2")
public class TranConsumer implements RocketMQListener<String> {

    @Override
    public void onMessage(String s) {
        System.out.println("收到： " + s);
    }
}
